import request from "@/utils/request";
// TODO 登录
export function login(data) {
    return request({
        url: '/user.useropen/phonelogin',
        method: 'POST',
        data: data
    });
}
// TODO 意见反馈
export function getSubmitFeedback(data) {
    return request({
        url: '/user.Feedback/submitFeedback',
        method: 'POST',
        data: data
    });
}

// TODO 获取用户信息
export function getUserInfo(data) {
    return request({
        url: `/user.index/detail`,
        method: 'get',
        params: data,
    });
}
// TODO 获取短信验证
export function getCode(data) {
    return request({
        url: `/user.Sms/sms`,
        method: 'POST',
        data: data,
    });
}




// TODO 模拟考试
// 模拟考试-随机出题（9）固定出题（12）
export function getSimulatedExam(data) {
    return request({
        url: `/paper.Paper/list`,
        method: 'get',
        params: data,
    });
}
// 查看是否有未提交的练习
//  getHomeOldRecord: 'paper.Paper/getHomeOldRecord',
export function getHomeOldRecord(data) {
    return request({
        url: `/paper.Paper/getHomeOldRecord`,
        method: 'get',
        params: data,
    });
}
// 模拟考试-考试记录
export function getRecord(data) {
    return request({
        url: `/paper.Record/index`,
        method: 'get',
        params: data,
    });
}
// 模拟考试题目、练习题目
export function getSimulateDetail(data) {
    return request({
        url: `/paper.Paper/detail`,
        method: 'get',
        params: data,
    });
}
// 模拟考试-点击每题答案提交
export function getSubmitAnswer(data) {
    return request({
        url: `/paper.Paper/submitAnswer`,
        method: 'get',
        params: data,
    });
}
// 模拟考试-答题卡
export function getStartAnswer(data) {
    return request({
        url: `/paper.Paper/startAnswer`,
        method: 'get',
        params: data,
    });
}
// 模拟考试-考试结果
export function getResultAnswer(data) {
    return request({
        url: `/paper.Paper/resultAnswer`,
        method: 'get',
        params: data,
    });
}

// 提交试卷
export function getSubmitTheTestPaper(data) {
    return request({
        url: '/paper.Paper/submit',
        method: 'POST',
        data: data
    });
}

// TODO 我的收藏
// 收藏题目
export function favoriteTopic(data) {
    return request({
        url: '/paper.Favorite/fav',
        method: 'POST',
        data: data
    });
}


// TODO 章节练习

// 章节练习-课程大纲
export function getNestedData(data) {
    return request({
        url: `/career.CareerOutline/getNestedData`,
        method: 'get',
        params: data,
    });
}

// 章节练习-我的错题
export function getWrongQuestion(data) {
    return request({
        url: `/paper.Wrong/index`,
        method: 'get',
        params: data,
    });
}
// 章节练习-移除错题
export function getWrongQuestionDelete(data) {
    return request({
        url: `/paper.Wrong/delete`,
        method: 'get',
        params: data,
    });
}
// 章节练习-我的收藏
export function getCollectionList(data) {
    return request({
        url: `/paper.Favorite/list`,
        method: 'get',
        params: data,
    });
}
// 章节练习-单选、多选、判断
export function getHomeStartPractice(data) {
    return request({
        url: `/paper.Paper/homeStartPractice`,
        method: 'get',
        params: data,
    });
}
// 章节练习-单选、多选、判断 每次提交
export function getHomeSubmitPractice(data) {
    return request({
        url: `/paper.Paper/homeSubmitPractice`,
        method: 'get',
        params: data,
    });
}
// 章节练习-单选、多选、判断 总提交
export function getHomeSubmit(data) {
    return request({
        url: `/paper.Paper/homeSubmit`,
        method: 'POST',
        data: data,
    });
}










// TODO 视频学习

// 获取实操视频列表
export function getPracticalVideo(data) {
    return request({
        url: `/course.course/list`,
        method: 'get',
        params: data,
    });
}
// 获取鉴定站
export function getCareerAppraisal(data) {
    return request({
        url: `/career.CareerAppraisal/list`,
        method: 'get',
        params: data,
    });
}
// 获取实操视频详情
export function getPracticalVideoDetail(data) {
    return request({
        url: `/course.course/detail`,
        method: 'get',
        params: data,
    });
}

// 保存用户观看进度
export function getSaveProgress(data) {
    return request({
        url: '/course.VideoWatchProgress/saveProgress',
        method: 'POST',
        data: data
    });
}
// 获取用户观看进度
export function getProgress(data) {
    return request({
        url: `/course.VideoWatchProgress/getProgress`,
        method: 'get',
        params: data,
    });
}





// TODO 公告

// 获取公告列表
export function getNoticelist(data) {
    return request({
        url: `/user.Notice/index`,
        method: 'get',
        params: data,
    });
}
// 获取公告详情
export function getNoticeDetail(data) {
    return request({
        url: `/user.Notice/getNoticeById`,
        method: 'get',
        params: data,
    });
}
// 公告已读
export function getNoticeMarkAsRead(data) {
    return request({
        url: `/user.Notice/markAsRead`,
        method: 'get',
        params: data,
    });
}
